package com.lagou.rocket.dao;

import com.lagou.rocket.pojo.Order;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface OrderDao extends JpaRepository<Order, Long> {

    @Modifying
    @Query(value = "UPDATE order01 SET status = ?2 WHERE id = ?1", nativeQuery = true)
    void payOrder(Long id, Integer status);
}
